package com.gnerv.pabu.manage;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@SpringBootApplication
@ComponentScan(basePackages = {"com.gnerv.pabu"})
@MapperScan(basePackages = {"com.gnerv.pabu.**.mapper"})
@EnableTransactionManagement
@EnableEurekaClient
@RestController
@CrossOrigin
@EnableFeignClients(basePackages = "com.gnerv.pabu.basic.feign.client")
public class ManageApplication {

    @Value("${server.port}")
    private String str;

    public static void main(String[] args) {
        SpringApplication.run(ManageApplication.class, args);
    }

    @RequestMapping("get")
    public String get() {
        return str;
    }
}
